Raspberry Pi /RP2040 /DMA /SNIFF_CTRL

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as SNIFF_CTRL

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (EN)EN 0DMACH0 (CRC32)CALC0 (BSWAP)BSWAP 0 (OUT_REV)OUT_REV 0 (OUT_INV)OUT_INV

CALC=CRC32

Description

Sniffer Control

Fields

EN

Enable sniffer

DMACH

DMA channel for Sniffer to observe

CALC

0 (CRC32): Calculate a CRC-32 (IEEE802.3 polynomial)

1 (CRC32R): Calculate a CRC-32 (IEEE802.3 polynomial) with bit reversed data

2 (CRC16): Calculate a CRC-16-CCITT

3 (CRC16R): Calculate a CRC-16-CCITT with bit reversed data

14 (EVEN): XOR reduction over all data. == 1 if the total 1 population count is odd.

15 (SUM): Calculate a simple 32-bit checksum (addition with a 32 bit accumulator)

BSWAP

Locally perform a byte reverse on the sniffed data, before feeding into checksum.

Note that the sniff hardware is downstream of the DMA channel byteswap performed in the read master: if channel CTRL_BSWAP and SNIFF_CTRL_BSWAP are both enabled, their effects cancel from the sniffer’s point of view.

OUT_REV

If set, the result appears bit-reversed when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus.

OUT_INV

If set, the result appears inverted (bitwise complement) when read. This does not affect the way the checksum is calculated; the result is transformed on-the-fly between the result register and the bus.

Links

() ()